package com.itheima.tliaswebmanagement.utils;

/**
 * @Description ThreadLocalUtil
 * @Author ziguan ling
 * @Date 2025--01--14
 */
public class ThreadLocalUtil {

    private static ThreadLocal<Integer> loginIdThreadLocal = new ThreadLocal<>();

    public static void setLoginId(Integer empId) {
        loginIdThreadLocal.set(empId);
    }


    public  static Integer  getLoginId(){
        return loginIdThreadLocal.get();
    }

    public static void removeLogin(){
        loginIdThreadLocal.remove();
    }


}
